chsecurity
使用 chsecurity 命令可更改系统的安全套接字层 (SSL)、安全 Shell (SSH) 或传输层安全性 (TLS) 安全设置。
语法
参数
切记: 这些参数是互斥的。您必须指定 -sslprotocol 或 -sshprotocol 中的一个,但不能同时指定。
- -sslprotocol security_level
- (必需)指定 SSL 安全级别设置的数字值,这可以是
1到4之间的任何值。3为缺省设置值。使用以下 sslprotocol 安全级别设置。1不允许 SSL 3.0。2只允许 TLS 1.2。3另外不允许并非专用于 1.2 的 TLS 1.2 密码套件。4另外不允许 RSA 密钥交换密码。
- -sshprotocol security_level
- (必需)指定 SSH 安全级别设置的数字值,这可以是
1或2。1是缺省设置值。使用以下 sshprotocol 安全级别设置。1允许以下密钥交换方法:- curve25519-sha256
- curve25519-sha256@libssh.org
- ecdh-sha2-nistp256
- ecdh-sha2-nistp384
- ecdh-sha2-nistp521
- diffie-hellman-group-exchange-sha256
- diffie-hellman-group16-sha512
- diffie-hellman-group18-sha512
- diffie-hellman-group14-sha256
- diffie-hellman-group14-sha1
- diffie-hellman-group1-sha1
- diffie-hellman-group-exchange-sha1
2允许以下密钥交换方法:- curve25519-sha256
- curve25519-sha256@libssh.org
- ecdh-sha2-nistp256
- ecdh-sha2-nistp384
- ecdh-sha2-nistp521
- diffie-hellman-group-exchange-sha256
- diffie-hellman-group16-sha512
- diffie-hellman-group18-sha512
- diffie-hellman-group14-sha256
- diffie-hellman-group14-sha1
描述
此命令将更改系统上的 SSL、SSH 或 TLS 安全设置。要点: 如果使用 SSL 或 TLS,那么更改安全性可能会中断这些服务。
如果发生中断,请使用此过程。
- 等待 5 分钟,然后重试。(等待所有服务重新启动。)
- 确认 SSL 或 TLS 实施为最新实施且支持所指定的安全级别。
- 如有必要,请还原为较低版本的 SSL 或 TLS 安全性。
调用示例
chsecurity -sslprotocol 4生成的输出
Changing the SSL security level could disable the GUI connection on old web browsers,
and changing the SSH security level may logout existing SSH sessions. Are you sure you wish to continue? (y/yes to confirm)调用示例
chsecurity -sshprotocol 2生成的输出
Changing the SSL security level could disable the GUI connection on old web browsers,
and changing the SSH security level may logout existing SSH sessions. Are you sure you wish to continue? (y/yes to confirm)